<?php


namespace app\common\model\video;


use app\common\model\BaseModel;
use think\model\relation\HasOne;

class OrderPart extends BaseModel
{
    protected $name = "video_order_part";
    protected $updateTime = false;

    public function part(){
        $module = self::getCalledModule() ?:'common';
        return $this->belongsTo("app\\{$module}\\model\\video\\CoursePart", 'part_id', 'id');
    }

    public function course(){
        $module = self::getCalledModule() ?:'common';
        return $this->belongsTo("app\\{$module}\\model\\video\\Course",'c_id','id');
    }
}